home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import java.awt.Component;
- import java.awt.event.ActionEvent;
-
- public class DefaultEditorKit$InsertContentAction extends TextAction {
- public DefaultEditorKit$InsertContentAction() {
- super("insert-content");
- }
-
- public void actionPerformed(ActionEvent e) {
- JTextComponent target = ((TextAction)this).getTextComponent(e);
- if (target != null && e != null) {
- String content = e.getActionCommand();
- if (content != null) {
- target.replaceSelection(content);
- } else {
- ((Component)target).getToolkit().beep();
- }
- }
-
- }
- }
-